﻿<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>北京 - 会员注册 - 锐车</title>
	<meta content="锐车" name="keywords" />
	<meta content="锐车" name="description" />
    <link rel="stylesheet" href="__STATIC__/layui/css/layui.css">
	<link rel="stylesheet" type="text/css" href="__STATIC__/home/Css/style.css">
	<script type="text/javascript" src="__STATIC__/home/Scripts/jquery.js"></script>
	<script type="text/javascript" src="__STATIC__/layui/layui.js"></script>
	<script type="text/javascript" src="__STATIC__/home/Scripts/common.js"></script>
  </head>
	<body>
	<body class="loginbg">
	<div class="loginhead">
		<div class="loginheadbox layui-clear">
			<div class="logo">
				<a href="/"><img src="__STATIC__/home/Picture/20181210160709_66796.png"></a>
			</div>
			<div class="logintext">
				已有账号？&nbsp;&nbsp;<a href="{:url('home/Home/login')}" target="_blank" style="color:#f60">立即登录</a>
			</div>
		</div>
	</div>


	<div class="layui-container">
		<div class="login_main">
		<div class="title">注册锐车</div>
			<div class="mt20">
				<form name="registerform" id="registerform" wid100 class="layui-form" method="post" action="">
					<div class="layui-form-item">
						<label class="layui-form-label">用户名</label>
						<div class="layui-input-inline">
							<input type="text" name="username" id="username" class="layui-input" placeholder="请输入用户名"/>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">密码</label>
						<div class="layui-input-inline">
							<input type="password" name="pwd" id="pwd" placeholder="请输入密码" class="layui-input"/>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">确认密码</label>
						<div class="layui-input-inline">
							<input type="password" name="pwd_confirm" id="pwd_confirm" placeholder="请再次输入密码" class="layui-input"/>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">姓名</label>
						<div class="layui-input-inline">
							<input type="text" name="name" id="name" class="layui-input" placeholder="请输入姓名"/>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">手机号</label>
						<div class="layui-input-inline">
							<input type="text" name="phone" id="phone" class="layui-input" placeholder="请输入手机号"/>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">e-mail</label>
						<div class="layui-input-inline">
							<input type="text" name="email" id="email" class="layui-input" placeholder="请输入邮箱"/>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">图形验证码</label>
						<div class="layui-input-inline">
							<input name="checkcode" id="checkcode" class="layui-input" placeholder="请填写图形验证码">
						</div>
						<div class="layui-input-inline">
							<img src="{:captcha_src()}" width="70" height="30" title="点击刷新验证码" class='cap'>
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">&nbsp;</label>
						<div class="layui-input-inline">
							<input type="submit" value="立即注册" class="layui-btn layui-btn-fluid layui-btn-danger" lay-submit="">
							<input type="hidden" name="sub" value="register">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">&nbsp;</label>
						<div class="layui-input-inline" style="width:30px;">
							<input type="checkbox" name="agree" title="" lay-skin="primary" checked lay-verify="required">
						</div>
						<div class="layui-form-mid layui-word-aux">我已经看过并同意 <a href="/about/5" target="_blank">《服务协议》</a></div>
					</div>
				</form>
			</div>
		</div>
	</div>
	<div class="logincopyright">
		 Copyright  2015 锐车 版权所有. 锐车11111
	</div>
	<script type="text/javascript">
		layui.use(['form','layer'], function(){ 
			var form = layui.form;
			var layer = layui.layer;
			var msg = "";
			
			$('.layui-form').submit(function(e)
		      {
		        e.preventDefault();

		        var index = parent.layer.getFrameIndex(window.name);
		        $.ajax({
		              type:'post',
		              url:"{:url('home/Home/register')}",
		              //form中所有值全传
		              data:$('form').serialize(),
		              datatype:'json',
		              success:function(result)
		              {
		                  if(result.code==1)
		                  {
		                      layer.msg(result.msg,{icon:1,time:1000},function()
		                      {
		                      	  //成功后跳转主页
		                      	  window.location.href="{:url('home/Home/login')}";
		                      });
		                  }
		                  else
		                  {
		                      layer.msg(result.msg,{icon:2,time:1000},function()
		                      {
		                          
		                      });
		                  }
		              }
		          })
		        })
		});
		$('.cap').click(function(){
                $(this).attr('src',"{:captcha_src()}?"+Math.random());
            });
	</script>
	</body>
</html>